var status = 0; 
var sendok = "You dont have 1 x #v4001094#."; 
var tls = new Array(2041200); 
function start() { 
   status = - 1; 
   action(1, 0, 0); 
   } 
function action(mode, type, selection) { 
   if (mode == - 1) { 
      cm.dispose(); 
      } 
   else { 
      if (mode == 0 && status == 0) { 
         cm.dispose(); 
         return; 
         } 
      if (mode == 1) status++; 
      else status--; 
      if (status == 0) { 
     
         var text = "Hi #b" + cm.getPlayer().getName() + "!#k I'm #rDragon Stone Exchanger#k in #bThis Server.#k Pick one?"; 
         for (var i = 0; i < tls.length; i++) { 
            text += "\r\n#L" + i + "##v" + tls[i] + "# -[1 x #v4001094#]-#l"; 
            } 
         cm.sendSimple(text); 
         } 
      else if (status == 1) { 
if (cm.haveItem(4001094,1)){ 
    cm.gainItem(4001094, -1); 
         cm.gainItem(tls[selection]); 
         cm.sendOk("OK, have fun in #b#eTuNaMS!"); 
         cm.dispose(); 
         } 
else 
cm.sendOk(sendok); 
cm.dispose(); 
      } 
   } 
}  